<%@ page import="history.*" %>



<div class="fieldcontain ${hasErrors(bean: teamInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="team.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${teamInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: teamInstance, field: 'memo', 'error')} ">
	<label for="memo">
		<g:message code="team.memo.label" default="Memo" />
		
	</label>
	<g:textField name="memo" value="${teamInstance?.memo}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: teamInstance, field: 'accounts', 'error')} ">
	<label for="accounts">
		<g:message code="team.accounts.label" default="Accounts" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${teamInstance?.accounts?}" var="a">
    <li><g:link controller="account" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
</div>
<div class="fieldcontain ${hasErrors(bean: teamInstance, field: 'powers', 'error')} ">
    <label for="powers">
        <g:message code="team.powers.label" default="Powers" />
    </label>
<g:each in="${history.Power.list(sort:'id')}" var="power" status="i">
    <g:checkBox name="powers" value="${power.id}" checked="${teamInstance?.powers?.contains(power)}" />${power}
</g:each>
</div>     


